package com.demo.resourcecode.c11mvc;

import java.beans.PropertyEditorSupport;

import com.demo.resourcecode.c9mybatis.User;

//编写自定义的属性编辑器
public class UserPropertyEditor extends PropertyEditorSupport {

	public UserPropertyEditor() {
		super();
		System.out.println("init UserPropertyEditor");
	}

	@Override
	public void setAsText(String arg0) throws IllegalArgumentException {
		User u = new User();
		u.setId(1);
		u.setName(arg0);
		this.setValue(u);
	}

}
